<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
</head>
<link
        href="https://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css"
        rel="stylesheet">
<link
        href="https://cdn.bootcss.com/bootstrap-table/1.11.1/bootstrap-table.min.css"
        rel="stylesheet">
<!-- jquery -->
<script src="https://cdn.bootcss.com/jquery/2.2.3/jquery.min.js"></script>
<script
        src="https://cdn.bootcss.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<!-- bootstrap-table.min.js -->
<script
        src="https://cdn.bootcss.com/bootstrap-table/1.11.1/bootstrap-table.min.js"></script>
<!-- 引入中文语言包 -->
<script
        src="https://cdn.bootcss.com/bootstrap-table/1.11.1/locale/bootstrap-table-zh-CN.min.js"></script>
<style type="text/css">
    body {
        padding-top: 50px;
    }

    .starter-template {
        padding: 40px 15px;
        text-align: center;
    }
</style>
<body>
<p>首页欢迎您！</p>
<nav class="navbar navbar-inverse navbar-fixed-top">
    <div class="container">
        <div class="navbar-header">
            <a class="navbar-brand" href="#">Spring Security演示</a>
        </div>
        <div id="navbar" class="collapse navbar-collapse">
            <ul class="nav navbar-nav">
                <li><a th:href="@{/}">首页</a></li>
                <li><a th:href="@{http://www.baidu.com}">百度</a></li>
            </ul>
        </div>
    </div>
</nav>
<div class="container">
    <div class="starter-template">
        <h1 th:text="标题"></h1>
        <p class="bg-primary" th:text="内容"></p>
        <div sec:authorize="hasAuthority('user_add')">
            <p class="bg-info" th:text="user_add">user_add内容</p>
        </div>
        <div sec:authorize="hasAuthority('user_edit')">
            <p class="bg-info">user_edit更多显示信息</p>
        </div>
        <div sec:authorize="hasAuthority('user_list')">
            <p class="bg-info">user_list更多显示信息</p>
        </div>

        <form th:action="@{/logout}" method="post">
            <input type="submit" class="btn btn-primary" value="注销"/>
        </form>
    </div>
</div>
</body>
</html>